package com.qkss;

import com.qkss.mapper.EbProductMapper;
import com.qkss.model.EbProduct;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.List;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:xml/spring-dao.xml")
public class aaa {
    //查询商品表
    @Autowired
    private EbProductMapper ebProductMapper;
    /*查询商品表eb_product 所有数据List—蛇皮袋【西瓜】
     *mybatis是一个orm持久层框架
     *oObject
     *r relationship
     *m mapping
     *
     *数据库：表（Student）—Java：类
     *一行数据对象
     *字段属性
     */
    @Test
    public void whenSelectAllSuccess()
    {

        List<EbProduct> products = ebProductMapper.selectByExample(null);
        //products.sout
        System.out.println(products);
    }
}
